﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for AnswerBL
/// </summary>
public class AnswerBL : AnswerProperties
{
	public AnswerBL()
	{
		//
		// TODO: Add constructor logic here
		//
	}

    public AnswerBL(string answerText, string questionId, bool is_Correct, long userId)
    {
        // TODO: Complete member initialization
        this.AnswerText = answerText;
        this.QuestionId = Convert.ToInt64(questionId);
        this.Is_Correct = is_Correct;
        this.UserId = userId;
    }

    public AnswerBL(long answerId, string answerText, string questionId,bool isCorrect, long userId)
    {
        // TODO: Complete member initialization
        this.AnswerId = answerId;
        this.AnswerText = answerText;
        this.QuestionId = Convert.ToInt64(questionId);
        this.UserId = userId;
        this.Is_Correct = isCorrect;
    }

    public AnswerBL(long answerId)
    {
        // TODO: Complete member initialization
        this.AnswerId = answerId;
    }

    public bool Insert()
    {
        return AnswerDL.Insert(this);
    }

    public bool Update()
    {
        return AnswerDL.Update(this);
    }

    public bool Delete()
    {
        return AnswerDL.Delete(this);
    }
}